type NoNullableType<T> = T extends null | undefined ? never : T;

export const notEmpty = <T = any>(val: T): val is NoNullableType<T> => {
  return ![undefined, null, ""].includes(val as any);
};
